package com.zrspring.libv2.fresco;

import android.content.Context;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory;
import com.facebook.imagepipeline.core.ImagePipelineConfig;
import com.zrspring.libv2.util.LogUtil;
import okhttp3.OkHttpClient;

/**
 * @Encoding:UTF-8
 * @ClassName: com.zrspring.lib.fresco
 * @Description:
 * @Version
 * @Author rui
 * @CreatDate 2016年04月27日08:44 44
 */
public class MyFresco {

    public static void init(Context context) {
        OkHttpClient okHttpClient = new OkHttpClient.Builder()
                .retryOnConnectionFailure(true)
                .build();
        ImagePipelineConfig config = OkHttpImagePipelineConfigFactory
                .newBuilder(context, okHttpClient)
                .build();
        Fresco.initialize(context, config);
        LogUtil.infoMessage("MyFresco"," MyFresco initialize");
    }

}
